<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/inc/taglibs.jsp"%>
<script type="text/javascript">
	
</script>

<form id="pagerForm" method="post" action="${path }/admin/userRechargeStrategyChoose">
	<input type="hidden" name="eqTypeId" value="${eqTypeId }"/>
	<input type="hidden" name="eqExpandCode" value="${eqExpandCode }"/>
	<input type="hidden" name="eqApplicablePlatformId" value="${eqApplicablePlatformId }"/>
	<input type="hidden" name="pageNum" value="${pageTurn.page }" />
	<input type="hidden" name="numPerPage" value="${pageTurn.pageSize }" />
	<input type="hidden" name="rel" value="${rel }" />
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="${path }/admin/userRechargeStrategyChoose" method="post">
	<div class="searchBar">
		<table class="searchContent">
			<tr>
				<td>
                    <label>类型：</label>
                    <select id="eqTypeId" name="eqTypeId" >
                    	<option value="1" ${eqTypeId == 1 ? 'selected=selected' : ''}>送金额</option>
                    	<option value="2" ${eqTypeId == 2 ? 'selected=selected' : ''}>送积分</option>
                    </select>
                </td>
                <td>
                    <label>平台：</label>
					<select  name="eqApplicablePlatformId" id="eqApplicablePlatformId" class="combox">
						<c:forEach items="${applicablePlatformMap}" var="entry">
							<option value="${entry.key}">${entry.value}</option>
						</c:forEach>
					</select>
					<script type="text/javascript">
						jQuery('#eqApplicablePlatformId').val("${eqApplicablePlatformId }");
					</script>
                </td>
  				<td>
                    <label>渠道：</label>
					<select  name="eqExpandCode" id="eqExpandCode">
						<c:forEach items="${expandCodeEnumTypeMap}" var="entry">
							<option value="${entry.key}">${entry.value}</option>
						</c:forEach>
					</select>
					<script type="text/javascript">
						$('#eqExpandCode').val("${eqExpandCode}");
					</script>
                </td>
				<td>
					<div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div>
				</td>
			</tr>
		</table>
		<script type="text/javascript">
		</script>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="${path }/admin/userRechargeStrategyChoose/add.do?rel=${rel}&eqTypeId=${eqTypeId}&eqExpandCode=${eqExpandCode}&eqApplicablePlatformId=${eqApplicablePlatformId}" target="selectedTodo" rel="ids" title="确定保存?"><span>保存</span></a></li>
			<li class="line">line</li>
		</ul>
	</div>
	
	<table class="table" width="100%" layoutH="115">
		<thead>
			<tr>
				<th><label style="float:left"><input type="checkbox" class="checkboxCtrl" group="ids" /></label></th>
				<th>策略</th>
				<th>平台</th>
				<th>渠道</th>
			</tr>
			</thead>
		  	<tbody> 
  			  <c:choose>
				<c:when test="${null==userRechargeStrategyChooseList||userRechargeStrategyChooseList.isEmpty()}">
			  		<c:if test="${eqTypeId == 1 }">
					<tr>
						<td>
							<label><input type="checkbox" name="ids" id="ids" value="0" ></label>
						</td>
						<td>
							<label>不搞活动</label>
						</td>
						<td>
							<label>${applicablePlatformMap[eqApplicablePlatformId]}</label>
						</td>
						<td>
							<label>${expandCodeEnumTypeMap[eqExpandCode]}</label>
						</td>
					</tr>
					<tr>
						<td>
							<label><input type="checkbox" name="ids" id="ids" value="1" ></label>
						</td>
						<td>
							<label>按金额数值赠送</label>
						</td>
						<td>
							<label>${applicablePlatformMap[eqApplicablePlatformId]}</label>
						</td>
						<td>
							<label>${expandCodeEnumTypeMap[eqExpandCode]}</label>
						</td>
					</tr>
					<tr>
						<td>
							<label><input type="checkbox" name="ids" id="ids" value="2" ></label>
						</td>
						<td>
							<label>按金额比例赠送</label>
						</td>
						<td>
							<label>${applicablePlatformMap[eqApplicablePlatformId]}</label>
						</td>
						<td>
							<label>${expandCodeEnumTypeMap[eqExpandCode]}</label>
						</td>
					</tr>
					</c:if>
			  		<c:if test="${eqTypeId == 2 }">
					<tr>
						<td>
							<label><input type="checkbox" name="ids" id="ids" value="0" ></label>
						</td>
						<td>
							<label>不搞活动</label>
						</td>
						<td>
							<label>${applicablePlatformMap[eqApplicablePlatformId]}</label>
						</td>
						<td>
							<label>${expandCodeEnumTypeMap[eqExpandCode]}</label>
						</td>
					</tr>
					<tr>
						<td>
							<label><input type="checkbox" name="ids" id="ids" value="1" ></label>
						</td>
						<td>
							<label>按消费金额数值赠送</label>
						</td>
						<td>
							<label>${applicablePlatformMap[eqApplicablePlatformId]}</label>
						</td>
						<td>
							<label>${expandCodeEnumTypeMap[eqExpandCode]}</label>
						</td>
					</tr>
					<tr>
						<td>
							<label><input type="checkbox" name="ids" id="ids" value="2" ></label>
						</td>
						<td>
							<label>按消费金额比例赠送</label>
						</td>
						<td>
							<label>${applicablePlatformMap[eqApplicablePlatformId]}</label>
						</td>
						<td>
							<label>${expandCodeEnumTypeMap[eqExpandCode]}</label>
						</td>
					</tr>
					</c:if>
				</c:when>
				<c:otherwise>
					<c:forEach items="${userRechargeStrategyChooseList}" var="userRechargeStrategyChooseList">
				  		<c:if test="${eqTypeId == 1 }">
						<tr>
							<td>
								<label><input type="checkbox" name="ids" id="ids" value="0"  ${userRechargeStrategyChooseList.subId == 0 ? 'checked=checked' : ''}></label>
							</td>
							<td>
								<label>不搞活动</label>
							</td>
							<td>
								<label>${applicablePlatformMap[userRechargeStrategyChooseList.applicablePlatformId]}</label>
							</td>
							<td>
								<label>${expandCodeEnumTypeMap[userRechargeStrategyChooseList.expandCode]}</label>
							</td>
						</tr>
						<tr>
							<td>
								<label><input type="checkbox" name="ids" id="ids" value="1"  ${userRechargeStrategyChooseList.subId == 1 ? 'checked=checked' : ''}></label>
							</td>
							<td>
								<label>按金额数值赠送</label>
							</td>
							<td>
								<label>${applicablePlatformMap[userRechargeStrategyChooseList.applicablePlatformId]}</label>
							</td>
							<td>
								<label>${expandCodeEnumTypeMap[userRechargeStrategyChooseList.expandCode]}</label>
							</td>
						</tr>
						<tr>
							<td>
								<label><input type="checkbox" name="ids" id="ids" value="2" ${userRechargeStrategyChooseList.subId == 2 ? 'checked=checked' : ''}></label>
							</td>
							<td>
								<label>按金额比例赠送</label>
							</td>
							<td>
								<label>${applicablePlatformMap[userRechargeStrategyChooseList.applicablePlatformId]}</label>
							</td>
							<td>
								<label>${expandCodeEnumTypeMap[userRechargeStrategyChooseList.expandCode]}</label>
							</td>
						</tr>
						</c:if>
				  		<c:if test="${eqTypeId == 2 }">
						<tr>
							<td>
								<label><input type="checkbox" name="ids" id="ids" value="0"  ${userRechargeStrategyChooseList.subId == 0 ? 'checked=checked' : ''}></label>
							</td>
							<td>
								<label>不搞活动</label>
							</td>
							<td>
								<label>${applicablePlatformMap[userRechargeStrategyChooseList.applicablePlatformId]}</label>
							</td>
							<td>
								<label>${expandCodeEnumTypeMap[userRechargeStrategyChooseList.expandCode]}</label>
							</td>
						</tr>
						<tr>
							<td>
								<label><input type="checkbox" name="ids" id="ids" value="1"  ${userRechargeStrategyChooseList.subId == 1 ? 'checked=checked' : ''}></label>
							</td>
							<td>
								<label>按消费金额数值赠送</label>
							</td>
							<td>
								<label>${applicablePlatformMap[userRechargeStrategyChooseList.applicablePlatformId]}</label>
							</td>
							<td>
								<label>${expandCodeEnumTypeMap[userRechargeStrategyChooseList.expandCode]}</label>
							</td>
						</tr>
						<tr>
							<td>
								<label><input type="checkbox" name="ids" id="ids" value="2" ${userRechargeStrategyChooseList.subId == 2 ? 'checked=checked' : ''}></label>
							</td>
							<td>
								<label>按消费金额比例赠送</label>
							</td>
							<td>
								<label>${applicablePlatformMap[userRechargeStrategyChooseList.applicablePlatformId]}</label>
							</td>
							<td>
								<label>${expandCodeEnumTypeMap[userRechargeStrategyChooseList.expandCode]}</label>
							</td>
						</tr>
						</c:if>
					</c:forEach>
				</c:otherwise>
			</c:choose>
			</tbody>
		</table>
    <div style="clear:both"></div>
    <div class="panelBar">
        <%@ include file="/inc/admin_pagination.jsp" %>
    </div>
</div>

